﻿
using MS.Common;
using Prism.Ioc;
using Prism.Modularity;
using Prism.Regions;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Unity;
using wpf.Triage.ViewModels;
using wpf.Triage.Views;
namespace wpf.Triage
{
    public class TriageModule : IModule
    {
        public void RegisterTypes(IContainerRegistry containerRegistry)
        {
            //注册viewmodel
            containerRegistry.Register<TriageViewModel>();
            containerRegistry.Register<TriageResgisterViewModel>();
            containerRegistry.Register<TriageWebViewModel>();
            containerRegistry.Register<PatientListModel>();
            containerRegistry.Register<TestViewModel>();
            //注册导航
            //containerRegistry.RegisterForNavigation<wpf.Triage.Triage>("Triage");
            //containerRegistry.RegisterForNavigation<wpf.Triage.NursingView>("NursingView");

            //注册view
            containerRegistry.Register<Object, TriageBase>(nameof(TriageBase));
            containerRegistry.Register<Object, TriageRegisterView>(nameof(TriageRegisterView));
            containerRegistry.Register<Object, TriageWebView>(nameof(TriageWebView));
            containerRegistry.Register<Object, NursingView>(nameof(NursingView));
            //containerRegistry.Register<object, PatientList>(nameof(PatientList));
            containerRegistry.Register<object, TestView>(nameof(TestView));

            //对话框
            containerRegistry.RegisterDialog<PatientList>(nameof(PatientList));
        }
        public void OnInitialized(IContainerProvider containerProvider)
        {
            IRegionManager region = containerProvider.Resolve<IRegionManager>();
        }

        
    }
}
